import request from '@/utils/request'

export const getDeparment = () => {
  return request.get('/company/department')
}

// 获取负责人列表
export const getSimpleData = () => {
  return request.get('/sys/user/simple')
}

// 新增子部门
export const addDeparment = (data) => {
  return request.post('/company/department', data)
}

// 获取部门详情
export const getDeparmentDetail = (id) => {
  return request.get(`/company/department/${id}`)
}

// 修改
export const updataDeparment = (data) => {
  return request.put(`/company/department/${data.id}`, data)
}

// 删除
export const delDepartment = (id) => {
  return request.delete(`/company/department/${id}`)
}
